TARGET = threshold
 
CFLAGS = `pkg-config --cflags opencv` -Wall -g
LIBS = `pkg-config --libs opencv`
CXXFLAGS = $(CFLAGS)
 
SOURCE = $(wildcard *.c) 
OBJS = $(patsubst %.c,%.o,$(SOURCE))
 
all: $(TARGET)
 
$(TARGET): $(OBJS)
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS)
 
rebuild: clean all
 
clean:
	rm -rf *.o
	rm -f $(TARGET)
